Load required library for Single Trial Analysis
library(readxl)
library(statgenGxE)
library(statgenSTA)
##
## Attaching package: 'statgenSTA'
## The following object is masked from 'package:statgenGxE':
##
## TDMaize
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5 v purrr 0.3.4
## v tibble 3.1.6 v dplyr 1.0.7
## v tidyr 1.1.4 v stringr 1.4.0
## v readr 2.1.1 v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x tidyr::extract() masks statgenSTA::extract()
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
data <- read_excel('Copy of Sensory Data for Bayesian Analysis.xlsx')
Create a TD object for GxE analysis for Mealiness
dataTD <- createTD(data=data,genotype = 'Code',trial = 'Env')
Create a scatter plot of Finlay Wilkins Analysis
plot(Finlay1,plotType = 'scatter')

Mixed Model Analysis for GxE Table of Means
Mixed_VarComp <- gxeVarComp(TD = dataTD,trait = 'Mealiness')
summary(Mixed_VarComp)
## Fitted model formula
## Mealiness ~ trial + (1 | genotype)
##
## Sources of variation
## component % variance expl.
## trial 0.03 10.73 %
## genotype 0.04 17.68 %
## residuals 0.17 71.59 %
##
## Analysis of Variance Table for fully fixed model
## Df Sum Sq Mean Sq F value Pr(>F)
## trial 5 20.155 4.0310 23.4819 < 2.2e-16 ***
## genotype 149 63.467 0.4260 2.4813 1.551e-15 ***
## residuals 745 127.890 0.1717
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Compute Heritabilty
herit(Mixed_VarComp)
## [1] 0.1980021
GxGGE analysis
GGE_Mealiness <- gxeGGE(TD=dataTD,trait='Mealiness')
summary(GGE_Mealiness)
## Principal components
## ====================
## PC1 PC2
## Standard deviation 0.6712052 0.4819086
## Proportion of Variance 0.3507900 0.1808300
## Cumulative Proportion 0.3507900 0.5316200
##
## Anova
## =====
## Analysis of Variance Table
##
## Response: Mealiness
## Df Sum Sq Mean Sq F value Pr(>F)
## Environment 5 20.155 4.0310 18.8324 < 2.2e-16 ***
## GGE 894 191.357 0.2140
## PC1 154 67.127 0.4359 2.8597 < 2.2e-16 ***
## PC2 152 34.603 0.2277 1.4935 0.0005577 ***
## Residuals 588 89.627 0.1524
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Environment scores
## ==================
## PC1 PC2
## E1 0.2666437 0.02293292
## E2 0.5129515 -0.03044473
## E3 0.5595663 0.60800254
## E4 0.4424047 -0.32720041
## E5 0.2271439 -0.71899381
## E6 0.3245785 -0.06977032
Visualize the results using a biplot
plot(GGE_Mealiness,plotType = 'GGE2',scale = 0.5,sizeGeno = 3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_Mealiness,plotType = 'AMMI1',scale = 0.5,sizeGeno = 3)+theme_classic()+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_Mealiness,plotType = 'AMMI2',scale = 0.5,sizeGeno = 3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

Identifying mega environmenet
Mega_Mealiness <- gxeMegaEnv(TD = dataTD,trait = 'Mealiness')
summary(Mega_Mealiness)
## Mega environments based on Mealiness
##
## Mega_factor Trial Winning_genotype AMMI_estimates
## megaEnv_1 E6 G128 2.239322
## megaEnv_2 E1 G13 2.664805
## megaEnv_2 E2 G13 2.715846
## megaEnv_2 E4 G13 2.472705
## megaEnv_2 E5 G13 2.545834
## megaEnv_3 E3 G34 2.573375
Let me visualize the Mega_Environment
plot(Mega_Mealiness)
## Warning in predict.megaEnv(x, engine = engine): One should be cautious with the interpretation of predictions for mega environments that are based on less than 10 trials.

Stability Analysis
Stability_Mealiness <- gxeStability(TD = dataTD,trait = 'Mealiness')
summary(Stability_Mealiness) # This shows top 10 performing genotype
##
## Cultivar-superiority measure (Top 10 % genotypes)
## genotype mean superiority
## G51 0.6666667 1.946667
## G39 0.8166667 1.757500
## G89 0.9000000 1.606667
## G59 0.9666667 1.601667
## G140 0.9166667 1.582500
## G143 0.9283333 1.564075
## G144 0.9000000 1.535000
## G66 0.9500000 1.529167
## G106 0.9500000 1.509167
## G60 0.9500000 1.499167
## G137 0.9666667 1.470000
## G65 0.9833333 1.440833
## G148 1.0500000 1.405833
## G43 1.0166667 1.405833
## G16 1.0166667 1.367500
##
## Static stability (Top 10 % genotypes)
## genotype mean static
## G110 1.1166667 0.6976667
## G111 1.5666667 0.5866667
## G101 1.3150000 0.5033500
## G139 1.3666667 0.4746667
## G125 1.1833333 0.4296667
## G67 1.3166667 0.4296667
## G146 1.3666667 0.4226667
## G132 1.4166667 0.4136667
## G59 0.9666667 0.3986667
## G77 1.3333333 0.3986667
## G15 1.0666667 0.3866667
## G60 0.9500000 0.3790000
## G32 1.5333333 0.3666667
## G120 1.4500000 0.3630000
## G37 1.1000000 0.3600000
##
## Wricke's ecovalence (Top 10 % genotypes)
## genotype mean wricke
## G110 1.1166667 2.614305
## G111 1.5666667 2.462718
## G10 1.4000000 2.263154
## G120 1.4500000 2.226874
## G83 1.3500000 2.188540
## G40 1.2833333 2.079376
## G139 1.3666667 1.912278
## G59 0.9666667 1.770572
## G84 1.2166667 1.608305
## G101 1.3150000 1.604292
## G30 1.3166667 1.592105
## G122 1.4833333 1.568029
## G67 1.3166667 1.548905
## G45 1.3166667 1.532145
## G150 1.4000000 1.528540
#summary(Stability_Mealiness,pctGeno=2) # This shows top 2 performing genotype
Create plot for different Stability measures
plot(Stability_Mealiness)

Create a scatter plot of Finlay Wilkins Analysis
plot(Finlay2,plotType = 'scatter')

Mixed Model Analysis for GxE Table of Means
Mixed_VarComp2 <- gxeVarComp(TD = dataTD,trait = 'Fibre')
summary(Mixed_VarComp2)
## Fitted model formula
## Fibre ~ trial + (1 | genotype)
##
## Sources of variation
## component % variance expl.
## trial 0.01 9.43 %
## genotype 0.01 10.38 %
## residuals 0.09 80.20 %
##
## Analysis of Variance Table for fully fixed model
## Df Sum Sq Mean Sq F value Pr(>F)
## trial 5 8.663 1.73270 18.6301 < 2.2e-16 ***
## genotype 149 24.617 0.16522 1.7764 6.536e-07 ***
## residuals 745 69.289 0.09301
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Compute Heritabilty
herit(Mixed_VarComp2)
## [1] 0.114579
GxGGE analysis
GGE_Fibre2 <- gxeGGE(TD=dataTD,trait='Fibre')
summary(GGE_Fibre2)
## Principal components
## ====================
## PC1 PC2
## Standard deviation 0.4188112 0.3379827
## Proportion of Variance 0.2783100 0.1812500
## Cumulative Proportion 0.2783100 0.4595600
##
## Anova
## =====
## Analysis of Variance Table
##
## Response: Fibre
## Df Sum Sq Mean Sq F value Pr(>F)
## Environment 5 8.663 1.73270 16.4955 1.343e-15 ***
## GGE 894 93.906 0.10504
## PC1 154 26.135 0.16971 1.9663 8.895e-09 ***
## PC2 152 17.021 0.11198 1.2974 0.01796 *
## Residuals 588 50.751 0.08631
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Environment scores
## ==================
## PC1 PC2
## E1 0.5609800 0.4189161
## E2 0.2200443 -0.0947831
## E3 0.5128015 -0.1702027
## E4 0.4963232 0.1886523
## E5 0.2167698 0.1087185
## E6 0.2838849 -0.8597366
Visualize the results using a biplot
plot(GGE_Fibre2,plotType = 'GGE2',scale = 0.5,sizeGeno = 3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_Fibre2,plotType = 'AMMI1',scale = 0.5,sizeGeno=3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_Fibre2,plotType = 'AMMI2',scale = 0.5,sizeGeno = 3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

Identifying mega environmenet
Mega_Fibre2 <- gxeMegaEnv(TD = dataTD,trait = 'Fibre')
summary(Mega_Fibre2)
## Mega environments based on Fibre
##
## Mega_factor Trial Winning_genotype AMMI_estimates
## megaEnv_1 E6 G37 2.672814
## megaEnv_2 E1 G39 2.875579
## megaEnv_2 E2 G39 2.240606
## megaEnv_2 E4 G39 2.588278
## megaEnv_3 E5 G44 2.601409
## megaEnv_4 E3 G53 2.773683
Let me visualize the Mega_Environment
plot(Mega_Fibre2)
## Warning in predict.megaEnv(x, engine = engine): One should be cautious with the interpretation of predictions for mega environments that are based on less than 10 trials.
## boundary (singular) fit: see ?isSingular

Stability Analysis
Stability_Fibre2 <- gxeStability(TD = dataTD,trait = 'Fibre')
summary(Stability_Fibre2) # This shows top 10 performing genotype
##
## Cultivar-superiority measure (Top 10 % genotypes)
## genotype mean superiority
## G46 1.466667 0.9841667
## G79 1.453333 0.9823667
## G99 1.500000 0.9225000
## G80 1.505000 0.9224083
## G36 1.545000 0.9192083
## G13 1.486667 0.9180333
## G118 1.501667 0.9110083
## G102 1.516667 0.9083333
## G92 1.516667 0.8950000
## G108 1.550000 0.8933333
## G73 1.516667 0.8900000
## G32 1.543333 0.8864667
## G121 1.530000 0.8732000
## G129 1.530000 0.8692000
## G11 1.600000 0.8658333
##
## Static stability (Top 10 % genotypes)
## genotype mean static
## G53 1.850000 0.4110000
## G41 1.916667 0.3656667
## G74 1.883333 0.3456667
## G42 2.066667 0.3266667
## G37 2.000000 0.3160000
## G30 1.800000 0.2920000
## G84 1.750000 0.2830000
## G36 1.545000 0.2780700
## G39 2.316667 0.2776667
## G49 2.148333 0.2680167
## G24 1.790000 0.2238000
## G44 2.050000 0.2030000
## G11 1.600000 0.2000000
## G90 1.821667 0.1876167
## G143 1.855000 0.1845500
##
## Wricke's ecovalence (Top 10 % genotypes)
## genotype mean wricke
## G37 2.000000 2.0351566
## G42 2.066667 1.5660810
## G53 1.850000 1.5353566
## G30 1.800000 1.4536899
## G44 2.050000 1.3018232
## G41 1.916667 1.2821610
## G49 2.148333 1.2114675
## G36 1.545000 1.1762426
## G39 2.316667 1.1668277
## G74 1.883333 1.1575921
## G84 1.750000 1.1099966
## G101 1.730000 1.0703139
## G106 1.800000 0.9209966
## G110 1.845000 0.8845346
## G91 1.750000 0.8390499
#summary(Stability_Mealiness,pctGeno=2) # This shows top 2 performing genotype
Create plot for different Stability measures
plot(Stability_Fibre2)

Create a scatter plot of Finlay Wilkins Analysis
plot(Finlay3,plotType = 'scatter')

Mixed Model Analysis for GxE Table of Means
Mixed_VarComp3 <- gxeVarComp(TD = dataTD,trait = 'ADH')
summary(Mixed_VarComp3)
## Fitted model formula
## ADH ~ trial + (1 | genotype)
##
## Sources of variation
## component % variance expl.
## trial 0.02 11.25 %
## genotype 0.01 6.17 %
## residuals 0.16 82.58 %
##
## Analysis of Variance Table for fully fixed model
## Df Sum Sq Mean Sq F value Pr(>F)
## trial 5 16.820 3.3640 21.4260 < 2.2e-16 ***
## genotype 149 33.884 0.2274 1.4484 0.001089 **
## residuals 745 116.969 0.1570
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Compute Heritabilty
herit(Mixed_VarComp3)
## [1] 0.06954118
GxGGE analysis
GGE_ADH3 <- gxeGGE(TD=dataTD,trait='ADH')
summary(GGE_ADH3)
## Principal components
## ====================
## PC1 PC2
## Standard deviation 0.5234381 0.4604582
## Proportion of Variance 0.2706200 0.2094200
## Cumulative Proportion 0.2706200 0.4800400
##
## Anova
## =====
## Analysis of Variance Table
##
## Response: ADH
## Df Sum Sq Mean Sq F value Pr(>F)
## Environment 5 16.820 3.3640 19.9360 < 2.2e-16 ***
## GGE 894 150.853 0.1687
## PC1 154 40.824 0.2651 1.9872 5.167e-09 ***
## PC2 152 31.591 0.2078 1.5580 0.0001507 ***
## Residuals 588 78.437 0.1334
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Environment scores
## ==================
## PC1 PC2
## E1 0.16090379 -0.03518110
## E2 0.06803636 0.07377478
## E3 0.61457510 0.46810238
## E4 0.57769545 -0.80008340
## E5 0.13656168 -0.02592046
## E6 0.48928247 0.36523201
Visualize the results using a biplot
plot(GGE_ADH3,plotType = 'GGE2',scale = 0.5,sizeGeno = 3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_ADH3,plotType = 'AMMI1',scale = 0.5,sizeGeno=3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_ADH3,plotType = 'AMMI2',scale = 0.5,sizeGeno=3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

Identifying mega environmenet
Mega_ADH3 <- gxeMegaEnv(TD = dataTD,trait = 'ADH')
summary(Mega_ADH3)
## Mega environments based on ADH
##
## Mega_factor Trial Winning_genotype AMMI_estimates
## megaEnv_1 E4 G100 3.022876
## megaEnv_2 E2 G108 2.066303
## megaEnv_3 E1 G140 2.520384
## megaEnv_3 E5 G140 2.543945
## megaEnv_4 E3 G6 2.506002
## megaEnv_5 E6 G88 2.738992
Let me visualize the Mega_Environment
plot(Mega_ADH3)
## Warning in predict.megaEnv(x, engine = engine): One should be cautious with the interpretation of predictions for mega environments that are based on less than 10 trials.
## boundary (singular) fit: see ?isSingular

Stability Analysis
Stability_ADH3 <- gxeStability(TD = dataTD,trait = 'ADH')
summary(Stability_ADH3) # This shows top 10 performing genotype
##
## Cultivar-superiority measure (Top 10 % genotypes)
## genotype mean superiority
## G66 1.216667 1.4033333
## G37 1.406667 1.0926333
## G8 1.483333 1.0350000
## G21 1.500000 1.0075000
## G20 1.515000 0.9963750
## G47 1.516667 0.9650000
## G9 1.576667 0.9599833
## G146 1.563333 0.9595333
## G69 1.616667 0.9566667
## G116 1.616667 0.9033333
## G33 1.566667 0.8925000
## G51 1.566667 0.8858333
## G126 1.628333 0.8852417
## G72 1.616667 0.8833333
## G49 1.566667 0.8758333
##
## Static stability (Top 10 % genotypes)
## genotype mean static
## G84 2.083333 0.5256667
## G75 1.866667 0.4706667
## G31 2.150000 0.4550000
## G143 1.790000 0.3918000
## G133 1.933333 0.3826667
## G40 2.066667 0.3786667
## G11 2.186667 0.3738667
## G69 1.616667 0.3656667
## G150 2.033333 0.3466667
## G30 1.950000 0.3430000
## G50 2.050000 0.3350000
## G29 1.916667 0.3336667
## G122 1.815000 0.3333500
## G140 2.161667 0.3284167
## G88 2.300000 0.3200000
##
## Wricke's ecovalence (Top 10 % genotypes)
## genotype mean wricke
## G84 2.083333 2.232191
## G75 1.866667 2.149048
## G122 1.815000 1.916665
## G102 1.950000 1.779879
## G69 1.616667 1.761955
## G139 2.116667 1.697608
## G50 2.050000 1.596626
## G133 1.933333 1.596537
## G99 1.883333 1.501004
## G31 2.150000 1.457013
## G11 2.186667 1.445328
## G150 2.033333 1.441751
## G86 1.933333 1.412537
## G140 2.161667 1.364248
## G40 2.066667 1.355782
#summary(Stability_Mealiness,pctGeno=2) # This shows top 2 performing genotype
Create plot for different Stability measures
plot(Stability_ADH3)

Create a scatter plot of Finlay Wilkins Analysis
plot(Finlay4,plotType = 'scatter')

Mixed Model Analysis for GxE Table of Means
Mixed_VarComp4 <- gxeVarComp(TD = dataTD,trait = 'Softness')
summary(Mixed_VarComp4)
## Fitted model formula
## Softness ~ trial + (1 | genotype)
##
## Sources of variation
## component % variance expl.
## trial 0.01 4.25 %
## genotype 0.01 5.06 %
## residuals 0.21 90.69 %
##
## Analysis of Variance Table for fully fixed model
## Df Sum Sq Mean Sq F value Pr(>F)
## trial 5 8.401 1.68030 8.0315 2.174e-07 ***
## genotype 149 41.605 0.27923 1.3347 0.008802 **
## residuals 745 155.864 0.20921
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Compute Heritabilty
herit(Mixed_VarComp4)
## [1] 0.0528297
GxGGE analysis
GGE_Softness4 <- gxeGGE(TD=dataTD,trait='Softness')
summary(GGE_Softness4)
## Principal components
## ====================
## PC1 PC2
## Standard deviation 0.5790242 0.5155948
## Proportion of Variance 0.2529800 0.2005900
## Cumulative Proportion 0.2529800 0.4535600
##
## Anova
## =====
## Analysis of Variance Table
##
## Response: Softness
## Df Sum Sq Mean Sq F value Pr(>F)
## Environment 5 8.401 1.68030 7.6072 5.187e-07 ***
## GGE 894 197.469 0.22088
## PC1 154 49.955 0.32438 1.7677 1.250e-06 ***
## PC2 152 39.610 0.26059 1.4200 0.002255 **
## Residuals 588 107.904 0.18351
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Environment scores
## ==================
## PC1 PC2
## E1 0.1736535 0.20524782
## E2 0.8074720 0.01163411
## E3 -0.1901262 0.75811387
## E4 0.4386715 0.31508941
## E5 0.2498932 0.17342468
## E6 -0.1637258 0.50363070
Visualize the results using a biplot
plot(GGE_Softness4,plotType = 'GGE2',scale = 0.5,sizeGeno = 3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_Softness4,plotType = 'AMMI1',scale = 0.5,sizeGeno=3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_Softness4,plotType = 'AMMI2',scale = 0.5,sizeGeno=3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

Identifying mega environmenet
Mega_Softness4 <- gxeMegaEnv(TD = dataTD,trait = 'Softness')
summary(Mega_Softness4)
## Mega environments based on Softness
##
## Mega_factor Trial Winning_genotype AMMI_estimates
## megaEnv_1 E3 G150 3.191228
## megaEnv_1 E6 G150 3.438910
## megaEnv_2 E1 G32 3.119642
## megaEnv_2 E5 G32 3.544084
## megaEnv_3 E2 G73 3.930665
## megaEnv_3 E4 G73 3.195768
Let me visualize the Mega_Environment
plot(Mega_Softness4)
## Warning in predict.megaEnv(x, engine = engine): One should be cautious with the interpretation of predictions for mega environments that are based on less than 10 trials.
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.00235341 (tol = 0.002, component 1)

Stability Analysis
Stability_Softness4 <- gxeStability(TD = dataTD,trait = 'Softness')
summary(Stability_Softness4) # This shows top 10 performing genotype
##
## Cultivar-superiority measure (Top 10 % genotypes)
## genotype mean superiority
## G144 1.833333 1.872500
## G136 1.900000 1.870833
## G110 1.966667 1.844167
## G61 1.933333 1.670833
## G44 1.983333 1.611667
## G39 2.050000 1.571667
## G40 2.000000 1.554167
## G41 2.066667 1.495833
## G65 2.080000 1.482367
## G89 2.083333 1.418333
## G114 2.100000 1.400833
## G1 2.136667 1.388533
## G50 2.150000 1.373333
## G51 2.133333 1.347500
## G147 2.150000 1.341667
##
## Static stability (Top 10 % genotypes)
## genotype mean static
## G110 1.966667 0.7986667
## G113 2.316667 0.7096667
## G73 2.900000 0.6520000
## G8 2.800000 0.5640000
## G132 2.415000 0.5397500
## G32 2.916667 0.5096667
## G11 2.583333 0.4856667
## G35 2.550000 0.4830000
## G24 2.370000 0.4574000
## G4 2.466667 0.4466667
## G140 2.266667 0.4266667
## G64 2.316667 0.4216667
## G47 2.483333 0.4176667
## G138 2.533333 0.4106667
## G37 2.533333 0.4026667
##
## Wricke's ecovalence (Top 10 % genotypes)
## genotype mean wricke
## G110 1.966667 3.294290
## G113 2.316667 3.115023
## G8 2.800000 2.862557
## G73 2.900000 2.802797
## G47 2.483333 2.730530
## G150 2.650000 2.559157
## G35 2.550000 2.456637
## G138 2.533333 2.372583
## G140 2.266667 2.345570
## G4 2.466667 2.335863
## G24 2.370000 2.291175
## G132 2.415000 2.217556
## G10 2.616667 2.140317
## G11 2.583333 2.136583
## G42 2.283333 2.070477
#summary(Stability_Mealiness,pctGeno=2) # This shows top 2 performing genotype
Create plot for different Stability measures
plot(Stability_Softness4)

Create a scatter plot of Finlay Wilkins Analysis
plot(Finlay5,plotType = 'scatter')

Mixed Model Analysis for GxE Table of Means
Mixed_VarComp5 <- gxeVarComp(TD = dataTD,trait = 'Taste')
summary(Mixed_VarComp5)
## Fitted model formula
## Taste ~ trial + (1 | genotype)
##
## Sources of variation
## component % variance expl.
## trial 0.00 2.22 %
## genotype 0.01 10.73 %
## residuals 0.11 87.05 %
##
## Analysis of Variance Table for fully fixed model
## Df Sum Sq Mean Sq F value Pr(>F)
## trial 5 2.731 0.54623 4.8196 0.000241 ***
## genotype 149 29.374 0.19714 1.7395 1.638e-06 ***
## residuals 745 84.434 0.11333
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Compute Heritabilty
herit(Mixed_VarComp5)
## [1] 0.1097212
GxGGE analysis
GGE_Taste5 <- gxeGGE(TD=dataTD,trait='Taste')
summary(GGE_Taste5)
## Principal components
## ====================
## PC1 PC2
## Standard deviation 0.5196167 0.3638353
## Proportion of Variance 0.3534900 0.1733100
## Cumulative Proportion 0.3534900 0.5268000
##
## Anova
## =====
## Analysis of Variance Table
##
## Response: Taste
## Df Sum Sq Mean Sq F value Pr(>F)
## Environment 5 2.731 0.54623 4.2908 0.000731 ***
## GGE 894 113.808 0.12730
## PC1 154 40.230 0.26124 2.8523 < 2.2e-16 ***
## PC2 152 19.724 0.12976 1.4168 0.002392 **
## Residuals 588 53.854 0.09159
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Environment scores
## ==================
## PC1 PC2
## E1 0.15878308 -0.2831737
## E2 0.17213850 -0.1921576
## E3 0.86214862 0.3714031
## E4 0.22857271 -0.5337427
## E5 -0.08126664 -0.5242226
## E6 0.37816172 -0.4304152
Visualize the results using a biplot
plot(GGE_Taste5,plotType = 'GGE2',scale = 0.5,sizeGeno = 3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_Taste5,plotType = 'AMMI1',scale = 0.5,sizeGeno=3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_Taste5,plotType = 'AMMI2',scale = 0.5,sizeGeno=3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

Identifying mega environmenet
Mega_Taste5 <- gxeMegaEnv(TD = dataTD,trait = 'Taste')
summary(Mega_Taste5)
## Mega environments based on Taste
##
## Mega_factor Trial Winning_genotype AMMI_estimates
## megaEnv_1 E5 G126 2.839291
## megaEnv_2 E1 G37 2.596430
## megaEnv_2 E2 G37 2.532667
## megaEnv_3 E4 G49 2.657548
## megaEnv_4 E6 G57 2.743915
## megaEnv_5 E3 G81 3.003648
Let me visualize the Mega_Environment
plot(Mega_Taste5)
## Warning in predict.megaEnv(x, engine = engine): One should be cautious with the interpretation of predictions for mega environments that are based on less than 10 trials.

Stability Analysis
Stability_Taste5 <- gxeStability(TD = dataTD,trait = 'Taste')
summary(Stability_Taste5) # This shows top 10 performing genotype
##
## Cultivar-superiority measure (Top 10 % genotypes)
## genotype mean superiority
## G51 1.350000 1.3125000
## G43 1.766667 0.8366667
## G137 1.766667 0.7850000
## G60 1.816667 0.6725000
## G66 1.850000 0.6641667
## G39 1.833333 0.6416667
## G95 1.950000 0.6325000
## G15 1.866667 0.6316667
## G20 1.928333 0.6260750
## G119 1.866667 0.5833333
## G122 2.000000 0.5766667
## G142 1.900000 0.5700000
## G97 1.933333 0.5700000
## G35 1.983333 0.5591667
## G22 1.936667 0.5577000
##
## Static stability (Top 10 % genotypes)
## genotype mean static
## G85 2.133333 0.3826667
## G16 2.083333 0.3736667
## G126 2.060000 0.3584000
## G95 1.950000 0.3510000
## G43 1.766667 0.3386667
## G122 2.000000 0.3320000
## G42 2.266667 0.3266667
## G20 1.928333 0.2976167
## G59 2.066667 0.2946667
## G89 2.283333 0.2936667
## G101 2.050000 0.2670000
## G84 2.000000 0.2600000
## G23 2.200000 0.2560000
## G115 2.116667 0.2536667
## G137 1.766667 0.2506667
##
## Wricke's ecovalence (Top 10 % genotypes)
## genotype mean wricke
## G122 2.000000 2.003954
## G16 2.083333 1.900034
## G85 2.133333 1.794274
## G89 2.283333 1.673381
## G43 1.766667 1.597328
## G42 2.266667 1.586848
## G126 2.060000 1.583613
## G95 1.950000 1.526888
## G20 1.928333 1.516491
## G59 2.066667 1.357688
## G115 2.116667 1.344608
## G4 2.248333 1.329291
## G101 2.050000 1.238274
## G23 2.200000 1.219888
## G84 2.000000 1.151861
#summary(Stability_Mealiness,pctGeno=2) # This shows top 2 performing genotype
Create plot for different Stability measures
plot(Stability_Taste5)

Create a scatter plot of Finlay Wilkins Analysis
plot(Finlay6,plotType = 'scatter')

Mixed Model Analysis for GxE Table of Means
Mixed_VarComp6 <- gxeVarComp(TD = dataTD,trait = 'Colour')
summary(Mixed_VarComp6)
## Fitted model formula
## Colour ~ trial + (1 | genotype)
##
## Sources of variation
## component % variance expl.
## trial 0.01 1.61 %
## genotype 0.14 33.63 %
## residuals 0.27 64.76 %
##
## Analysis of Variance Table for fully fixed model
## Df Sum Sq Mean Sq F value Pr(>F)
## trial 5 6.362 1.27247 4.7276 0.0002935 ***
## genotype 149 165.079 1.10791 4.1162 < 2.2e-16 ***
## residuals 745 200.522 0.26916
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Compute Heritabilty
herit(Mixed_VarComp6)
## [1] 0.3418336
GxGGE analysis
GGE_Colour6 <- gxeGGE(TD=dataTD,trait='Colour')
summary(GGE_Colour6)
## Principal components
## ====================
## PC1 PC2
## Standard deviation 1.112813 0.6544453
## Proportion of Variance 0.504690 0.1745500
## Cumulative Proportion 0.504690 0.6792400
##
## Anova
## =====
## Analysis of Variance Table
##
## Response: Colour
## Df Sum Sq Mean Sq F value Pr(>F)
## Environment 5 6.36 1.27247 3.1116 0.008604 **
## GGE 894 365.60 0.40895
## PC1 154 184.51 1.19815 6.0076 < 2.2e-16 ***
## PC2 152 63.82 0.41985 2.1051 2.757e-10 ***
## Residuals 588 117.27 0.19944
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Environment scores
## ==================
## PC1 PC2
## E1 0.3190079 0.13454126
## E2 0.2128748 -0.80776543
## E3 0.6160721 0.19717778
## E4 0.3780262 0.08482394
## E5 0.1861469 -0.51580453
## E6 0.5438924 0.13147307
Visualize the results using a biplot
plot(GGE_Colour6,plotType = 'GGE2',scale = 0.5,sizeGeno = 3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_Colour6,plotType = 'AMMI1',scale = 0.5,sizeGeno=3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

plot(GGE_Colour6,plotType = 'AMMI2',scale = 0.5,sizeGeno=3)+theme_classic()
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

Identifying mega environmenet
Mega_Colour6 <- gxeMegaEnv(TD = dataTD,trait = 'Colour')
summary(Mega_Colour6)
## Mega environments based on Colour
##
## Mega_factor Trial Winning_genotype AMMI_estimates
## megaEnv_1 E3 G120 3.101352
## megaEnv_1 E6 G120 2.960705
## megaEnv_2 E5 G122 2.752312
## megaEnv_3 E1 G51 2.793773
## megaEnv_3 E4 G51 3.071359
## megaEnv_4 E2 G8 2.978996
Let me visualize the Mega_Environment
plot(Mega_Colour6)
## Warning in predict.megaEnv(x, engine = engine): One should be cautious with the interpretation of predictions for mega environments that are based on less than 10 trials.

Stability Analysis
Stability_Colour6 <- gxeStability(TD = dataTD,trait = 'Colour')
summary(Stability_Colour6) # This shows top 10 performing genotype
##
## Cultivar-superiority measure (Top 10 % genotypes)
## genotype mean superiority
## G143 1.016667 1.935000
## G33 1.100000 1.797500
## G144 1.166667 1.674167
## G111 1.166667 1.660833
## G72 1.183333 1.628333
## G20 1.191667 1.610075
## G10 1.216667 1.608333
## G43 1.316667 1.605000
## G29 1.250000 1.546667
## G22 1.316667 1.531667
## G60 1.283333 1.531667
## G147 1.366667 1.460833
## G136 1.300000 1.449167
## G21 1.433333 1.449167
## G17 1.383333 1.431667
##
## Static stability (Top 10 % genotypes)
## genotype mean static
## G8 1.616667 0.7976667
## G138 2.116667 0.7336667
## G145 1.916667 0.7256667
## G46 2.116667 0.7136667
## G79 1.616667 0.6896667
## G30 2.150000 0.6830000
## G25 2.083333 0.6776667
## G31 1.816667 0.6696667
## G82 2.150000 0.6590000
## G32 1.971667 0.6548167
## G99 2.133333 0.6306667
## G9 1.690000 0.6214000
## G78 1.966667 0.6146667
## G134 1.683333 0.6056667
## G21 1.433333 0.5986667
##
## Wricke's ecovalence (Top 10 % genotypes)
## genotype mean wricke
## G138 2.116667 3.930962
## G8 1.616667 3.642296
## G82 2.150000 3.481682
## G31 1.816667 3.411336
## G145 1.916667 3.306802
## G134 1.683333 3.267389
## G46 2.116667 3.149496
## G79 1.616667 3.119496
## G32 1.971667 3.031630
## G30 2.150000 2.997282
## G15 1.983333 2.967096
## G58 1.905000 2.844390
## G78 1.966667 2.843909
## G25 2.083333 2.831176
## G9 1.690000 2.800306
#summary(Stability_Mealiness,pctGeno=2) # This shows top 2 performing genotype
Create plot for different Stability measures
plot(Stability_Colour6)
